//
//  SAFeedbackQuestionListViewController.m
//  SunOn
//
//  Created by mc on 2017/5/4.
//  Copyright © 2017年 NeoZhang. All rights reserved.
//  我反馈的问题list列表 针对生产问题  销售问题  售后问题

#import "SAFeedbackQuestionListViewController.h"
#import "SAFeedbackListChildViewController.h"
@interface SAFeedbackQuestionListViewController ()

@property (nonatomic, strong) NSArray *titleData;

@end

@implementation SAFeedbackQuestionListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self configureView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark 初始化代码
- (instancetype)init {
    if (self = [super init]) {
        self.titleSizeNormal = 15;
        self.titleSizeSelected = 15;
        self.menuViewStyle = WMMenuViewStyleLine;
        self.pageAnimatable = YES;
        self.titleColorSelected = [UIColor colorWithHexString:@"#0084fd"];
        self.titleColorNormal = [UIColor blackColor];
        self.menuItemWidth = SASCREEN_WIDTH / 3;
        self.progressColor = [UIColor colorWithHexString:@"#0084fd"];
        self.menuHeight = 40;
        self.menuBGColor = [UIColor whiteColor];
        self.progressWidth = SASCREEN_WIDTH / 3 - 20;
    }
    return self;
    
}

#pragma mark - view cycle
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithImage:SAImageNamed(@"ljiantou") style:(UIBarButtonItemStyleDone) target:self action:@selector(Handleback)];
    self.navigationItem.leftBarButtonItem = item;
}
#pragma mark - view layout
- (void)configureView {
    self.title = @"我反馈的信息";
}
#pragma mark - custome method
- (void)Handleback {
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - Datasource & Delegate
- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController {
    return self.titleData.count;
}
- (NSString *)pageController:(WMPageController *)pageController titleAtIndex:(NSInteger)index {
    return self.titleData[index];
}
- (UIViewController *)pageController:(WMPageController *)pageController viewControllerAtIndex:(NSInteger)index {
    SAFeedbackListChildViewController *vcClass = [[SAFeedbackListChildViewController alloc] init];
    vcClass.type = index;
    return vcClass;
}

#pragma mark - setter&getter
- (NSArray *)titleData {
    if (!_titleData) {
        _titleData = @[@"产品信息",@"销售问题",@"售后问题"];
    }
    return _titleData;
}

@end
